﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using JUIDemoMVC3RC2Project.Models;
using System.Collections;

namespace JUIDemoMVC3RC2Project.Controllers
{
    public class JController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }
        
        public ActionResult DatePicker()
        {
            SimpleModel model = new SimpleModel(DateTime.Now);

            return View(model);
        }

        public ActionResult MultiDatePicker()
        {
            SimpleModel model = new SimpleModel(DateTime.Now, DateTime.Today, DateTime.MinValue);

            return View("DatePicker", model);
        }

        [HttpPost]
        public ActionResult DatePicker(SimpleModel model)
        {
            return View(model);
        }

        public ActionResult Accordion()
        {
            IList list = new List<SimpleModel>();

            for (int i = 0; i < 5; i++)
            {
                list.Add(new SimpleModel("Title " + i,
                    i.ToString() + ".Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam accumsan, libero vitae faucibus viverra, magna ligula bibendum turpis, quis tempor ipsum nunc eget tellus. Duis venenatis mi sit amet leo laoreet gravida. Sed porttitor hendrerit libero, pretium lobortis sem porta et. Nullam ligula sem, eleifend a feugiat sit amet, sodales vel erat. Sed purus ligula, aliquet et interdum sed, tempor nec tortor. Vestibulum viverra mauris ut ligula commodo fringilla. Suspendisse quis tortor vel nunc dapibus interdum. Morbi vel lectus eget tortor adipiscing vulputate vel vitae lorem. Curabitur sed scelerisque enim. Integer at enim magna. Cras in libero non neque consectetur facilisis. Suspendisse aliquet, sem sit amet pellentesque vehicula, dui libero tempor nisi, vitae egestas massa lectus vitae sem. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed ornare, tellus sit amet malesuada iaculis, sapien lorem ultricies urna, et dignissim elit dui sed lectus."
                    ));
            }

            return View(list);
        }
    }
}
